SuspensionHost class¶
Attributes: [DebuggerDisplay("AppStateValue = {_appState}")]
Defined in
Namespace: ReactiveUI.Reactive
Assembly: ReactiveUI.Reactive.dll
Full name: ReactiveUI.Reactive.SuspensionHost<T>
Modifiers: public
Summary¶
Default strongly-typed implementation of ISuspensionHost.
Applies to
net10.0, net10.0-maccatalyst26.0, net10.0-desktop1.0, net10.0-browserwasm1.0, net10.0-tvos26.0, net10.0-windows10.0.19041, net10.0-macos26.0, net10.0-ios26.0, net10.0-android36.0, net9.0, net9.0-tvos18.0, net9.0-macos15.0, net9.0-maccatalyst18.0, net9.0-windows10.0.19041, net9.0-ios18.0, net9.0-desktop1.0, net8.0, net8.0-windows10.0.19041, net8.0-ios18.0, net8.0-maccatalyst18.0, net8.0-macos15.0, net8.0-tvos18.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.5, netstandard2.1, net481, net462, net471
Class hierarchy
classDiagram
class SuspensionHost~T~
class ReactiveObject
ReactiveObject <|-- SuspensionHost~T~
class ISuspensionHost~TAppState~ {
<>
}
ISuspensionHost~TAppState~ <|.. SuspensionHost~T~
class ISuspensionHost {
<>
}
ISuspensionHost <|.. SuspensionHost~T~
class IReactiveObject {
<>
}
IReactiveObject <|.. SuspensionHost~T~
class INotifyPropertyChanged {
<>
}
INotifyPropertyChanged <|.. SuspensionHost~T~
class INotifyPropertyChanging {
<>
}
INotifyPropertyChanging <|.. SuspensionHost~T~
class IEnableLogger {
<>
}
IEnableLogger <|.. SuspensionHost~T~
class IDisposable {
<>
}
IDisposable <|.. SuspensionHost~T~
Inherits from: ReactiveObject
Implements: ISuspensionHost
Remarks¶
This implementation provides settable lifecycle observables and a strongly-typed AppStateValue.
The legacy ISuspensionHost members AppState and CreateNewAppState are implemented explicitly to preserve compatibility with existing infrastructure. The explicit implementations project to/from the typed properties.
Type safety: if a consumer sets AppState to a value not assignable to
TAppState, the implementation throws an InvalidCastException.
Constructors¶
| Name | Summary |
|---|---|
| .ctor | Initializes a new instance of the [SuspensionHost](# class. |
Properties¶
| Name | Summary |
|---|---|
| IsLaunchingNew | Gets or sets the observable which signals when the application is launching new. |
| IsResuming | Gets or sets the observable which signals when the application is resuming from a suspended state. |
| IsUnpausing | Gets or sets the observable which signals when the application is activated / unpausing. |
| IsContinuing | Gets or sets an observable which signals when the application is continuing from a temporarily paused state. |
| ShouldPersistState | Gets or sets the observable which signals when the application should persist its state to disk. |
| ShouldInvalidateState | Gets or sets the observable which signals that the saved application state should be deleted. |
| CreateNewAppStateTyped | Gets or sets a function that can be used to create a new application state instance. |
| AppStateValue | Gets or sets the current application state. |
| AppStateValueChanged | Gets an observable that signals when [AppStateValue](# is assigned. |
Methods¶
| Name | Summary |
|---|---|
| Dispose | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. |
Inherited members
ReactiveUI.Reactive.ReactiveObject.SuppressChangeNotificationsReactiveUI.Reactive.ReactiveObject.AreChangeNotificationsEnabledReactiveUI.Reactive.ReactiveObject.DelayChangeNotificationsReactiveUI.Reactive.ReactiveObject.#ctorReactiveUI.Reactive.ReactiveObject.ChangingReactiveUI.Reactive.ReactiveObject.ChangedReactiveUI.Reactive.ReactiveObject.ThrownExceptionsReactiveUI.Reactive.ReactiveObject.PropertyChangingReactiveUI.Reactive.ReactiveObject.PropertyChangedSystem.Object.Equals(System.Object)System.Object.Equals(System.Object,System.Object)System.Object.GetHashCodeSystem.Object.GetTypeSystem.Object.MemberwiseCloneSystem.Object.ReferenceEquals(System.Object,System.Object)System.Object.ToString